/**
 * small-spring
 *
 * @author yuanchen
 * @date 2021-06-30 09:34
 */
package cn.bugstack.springframework.test.bean;

/**
 *
 * @author yuanchen
 * @date 2021-06-30 09:34
 */
public class UserService {

    private String name;

    private Integer age;

    private UserDao userDao;

    public UserService(String name) {
        this.name = name;
    }

    public UserService(Integer age) {
        this.age = age;
    }

    public UserService() {
    }

    public void queryUserInfo() {
        System.out.println("查询用户信息：" + name+"&age="+age);
        userDao.queryUserInfo();
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("");
        sb.append("").append(name);
        return sb.toString();
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public String getName() {
        return name;
    }

    public UserService setName(String name) {
        this.name = name;
        return this;
    }
}
